/**
 * @file es_drv_port.h
 *
 * @brief 开放驱动层的读写接口并向外提供驱动自动初始化的API。
 *
 * @author bagy
 *
 * @version V1.0
 *
 * @date 2024-05-14
 */

#ifndef  __ES_DRV_H__
#define  __ES_DRV_H__

#include "es_drv.h"
#include "drv_id.h"

/**
 * @brief Driver layer read interface.
 */
extern ES_INT32 es_drv_read(ES_INT32 fd, ES_VOID *buffer, ES_INT32 size);

/**
 * @brief Driver layer write interface.
 */
extern ES_INT32 es_drv_write(ES_INT32 fd, ES_CONST ES_VOID *buffer, ES_INT32 size);

/**
 * @brief Driver layer control interface.
 */
extern ES_INT32 es_drv_ioctl(ES_INT32 fd, ES_INT32 cmd, ES_VOID *args);

/**
 * @brief Driver automatic initialization.
 */
extern void es_drv_init(void);

#endif   /* __ES_DRV_H__ */
